Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NETPROD-3583] Added name param in ListOption to get resource by name #670

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

guptado
Copy link
Contributor

@guptado guptado commented Feb 27, 2024

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As many endpoints that use the shared ListOptions struct do not support filtering by name, it might be a bit misleading for users to include it here. I think it might be better to follow the pattern already used by Droplets and domain records by adding a new ListByName method to the certificate service. e.g.:

ListByName(context.Context, string, *ListOptions) ([]Droplet, *Response, error)

RecordsByName(context.Context, string, string, *ListOptions) ([]DomainRecord, *Response, error)

Thoughts?

@guptado
Copy link
Contributor Author

guptado commented Feb 28, 2024

As many endpoints that use the shared ListOptions struct do not support filtering by name, it might be a bit misleading for users to include it here. I think it might be better to follow the pattern already used by Droplets and domain records by adding a new ListByName method to the certificate service. e.g.:

ListByName(context.Context, string, *ListOptions) ([]Droplet, *Response, error)

RecordsByName(context.Context, string, string, *ListOptions) ([]DomainRecord, *Response, error)

Thoughts?

@andrewsomething I have made changes as requested. pls review :)

certificates.go Outdated Show resolved Hide resolved
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andrewsomething andrewsomething merged commit 16a4709 into main Feb 28, 2024
8 checks passed
@andrewsomething andrewsomething deleted the NETPROD-3583/addNameParams branch February 28, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants